1. Field of the Invention
The present invention relates to a computer program product, system, and method for resynchronizing to a first storage system after a failover to a second storage system mirroring the first storage system.
2. Description of the Related Art
In a storage environment, a storage controller may maintain mirror copy relationships, where a primary volume in a mirror copy relationship comprises the storage or volumes from which data is physically copied to a secondary or volume. Failover programs, such as International Business Machine Corporation's (“IBM”) HyperSwap® which is a function in the z/OS® operating system, provides continuous availability for disk failures by maintaining the mirror copy relationships to provide synchronous copies of all primary disk volumes on one or more primary storage systems to one or more target (or secondary) storage systems. (HyperSwap is a registered trademark of IBM in countries throughout the world). When a disk failure is detected, code in the operating system identifies HyperSwap managed volumes and instead of failing the I/O request, HyperSwap switches (or swaps) information in internal control blocks so that the I/O request is driven against the secondary volume of the mirror copy relationship. The failover is performed very quickly and involves only a very minor impact to the host applications. Host applications are not notified of the primary disk failure and are unaware that their access has been swapped to the secondary copy of the data. Since the secondary volume is an identical copy of the primary volume prior to the failure, the I/O request will succeed with no impact to the program issuing the I/O request, which could be an application program or part of the operating system. This therefore masks the disk failure from the program and avoids an application and/or system outage.
When a primary disk failure occurs, the failover function automatically swaps the access of the host systems from the failing primary disk control unit to the secondary control unit, which contains the secondary copy of data. After a failover occurs, mirroring between the two storage system pairs is suspended, which means updates that are being made by the applications to the current primary copy are not being mirrored to the secondary copy. While in this suspended state, another failover operation is not possible. This leaves the customer exposed to another failure of any kind that affects the only good copy of data that is remaining.
In the current art, to return the primary and secondary volumes to a failover enabled state, an administrator or user collects and analyzes diagnostic information from the failed primary storage system and makes repairs if necessary. The administrator/user may then initiate resynchronization of data from the current secondary site back to the primary storage that experienced the failover. The administrator/user may perform the resynchronization operation by initiating point-in-time (“PiT”) copies of the primary storage devices to provide a consistent copy of the data. Until the resynchronization is complete, the primary storage system devices will not be consistent and therefore, not useful for recovery. The point-in-time copy protects against a secondary storage system failure that occurs during a resynchronization
If data loss has occurred for any of the primary storage devices (as a result of the failure), the failed devices are resynchronized by performing a full copy from the secondary storage system devices corresponding to the failed primary storage system devices. For primary storage system devices which did not experience data loss, only updated tracks at the secondary storage system are copied back to the primary storage system during the resynchronization. When the resynchronization operation completes, the mirroring pairs are once again back in synchronization with each other.
The administrator/user managed resynchronization process can take many hours or even days. Until the process completes, the customer is exposed to a second failure.